package com.arithmeticEveryDay.blueBridge;

import java.util.Scanner;

public class Rods {
    
    static Scanner scan = new Scanner(System.in);
    
    int n;
    int[] x;
    int[] a;
    int[] b;

    private Rods(int n, int[] x, int[] a, int[] b) {
        this.n = n;
        this.x = x;
        this.a = a;
        this.b = b;
    }

    private double getTime() {
        // 从0到1
        double time = x[0];
        for (int i = 0; i < n-1; i++) {
            // 下一个杠的下标为j
            int j = i+1;
            double normalTime = x[j] - x[i];
            double skipTime = a[i]/0.7 + b[i]/1.3;
            System.out.println(normalTime + ", " + skipTime);
            time += normalTime > skipTime ? skipTime : normalTime;
        }
        return time;
    }


    public static void main(String[] args) {
        int n = scan.nextInt();
        int[] x = new int[n];
        int[] a = new int[n-1];
        int[] b = new int[n-1];
        for (int i = 0; i < n; i++) {
            x[i] = scan.nextInt();
        }
        for(int i = 0; i < n-1; i++) {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        Rods r = new Rods(n, x, a, b);
        System.out.printf("%.2f", r.getTime());
    }

}
